<div class="container col-thin" ng-init="isPublish = '<{$isPublish}>';judgeOrigin();" ng-controller="profileController">
     <div class="row wrap-col-head">
         <div class="col-xs-2">
             <img ng-src="__UPLOAD__/{{ userBase.image_url }}" width="45px" height="45px">
         </div>
         <div class="col-xs-6 col-profile-head">
             <h4>{{ userBase.user_name }}</h4>
             <div class="tag-group">
                 <span ng-show="userBase.trust == 2" class="tag-credit">信</span>
                 <span class="tag-level-first">甲.V{{ userBase.level_j }}</span>
                 <span class="tag-level-second">乙.V{{ userBase.level_y }}</span>
             </div>

             <input id="userId" type="hidden" value="<{$user_id}>">
         </div>
         <div ng-hide="userBase.is_self == 2" class="col-xs-2 col-thin center" ng-switch="hasFavored">
            <span class="icon-fav" ng-switch-when="1" ng-click="favUser()">收藏</span>
            <span class="icon-fav-del" ng-switch-when="2" ng-click="delFavUser()">取消收藏</span>
         </div>
         <div ng-hide="userBase.is_self == 2" class="col-xs-2 col-thin">
             <a href="<{:U('Message/sendOrReceiveMessage')}>/publisher_id/{{ userBase.user_id }}/publisher_name/{{ userBase.user_name }}">
                <span class="icon-msg-green">留言</span>
             </a>
         </div>
     </div>

    <div class="row">
        <div class="col-xs-12 col-panel-profile">
            <h5 ng-switch="userBase.is_self">个人资料
                <span ng-switch-default ng-click="getReportModal()" class="fl-right text-tips">举报</span>
                <a ng-switch-when="2" href="<{:U('Resume/modify')}>"><span class="fl-right text-modify">修改</span></a>
            </h5>
        </div>
    </div>

    <!-- User base info -->
    <div class="row">
        <div class="col-xs-12 wrap-col-cont">
            <dl class="dl-horizontal-single">
                <dt>性别</dt>
                <dd>{{ userBase.sexMeaning }}&nbsp;</dd>
                <dt ng-show="userBase.birthday">出生年份</dt>
                <dd ng-show="userBase.birthday">{{ userBase.birthday }}年&nbsp;</dd>
                <dt>现居住地</dt>
                <dd>{{ userBase.address }}&nbsp;</dd>
                <dt ng-show="userBase.degreeMeaning">学历信息</dt>
                <dd ng-show="userBase.degreeMeaning" class="dd-jobs">{{ userBase.degreeMeaning }}&nbsp;</dd>
                <dt ng-show="firstInfo.agent_j">公司名称</dt>
                <dd ng-show="firstInfo.agent_j">{{ firstInfo.agent_j }}&nbsp;</dd>
                <dt ng-show="firstInfo.agent_j_desc">公司简介</dt>
                <dd ng-show="firstInfo.agent_j_desc" class="dd-jobs">{{ firstInfo.agent_j_desc }}&nbsp;</dd>
            </dl>

        </div>
    </div>
    <div ng-hide="userBase.is_self == 2" ng-switch="userBase.resume_public" class="row wrap-col-cont">
        <div ng-switch-when="2">
            <div class="col-xs-6 right">
                <button class="btn btn-main-short" ng-click="getPhone()" ng-disabled="userBase.ispublic_phone != 2">电话联系</button>
            </div>
            <div class="col-xs-6 left">
                <button class="btn btn-main-short" ng-click="publicToOne()">对Ta公开信息</button>
            </div>
        </div>
        <div ng-switch-default>
            <div class="col-xs-12 center">
                <button class="btn btn-main-short" ng-click="getPhone()" ng-disabled="userBase.ispublic_phone != 2">电话联系</button>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-12 col-panel-profile">
            <h5>信任圈子</h5>
        </div>
    </div>

    <!-- Trust info -->
    <div class="row">
        <div class="col-xs-12 wrap-col-cont">
            <!-- Users it trusts -->
            <div class="row">
                <div class="col-xs-12">
                    <ul class="ul-float ul-user">
                        <li ng-repeat="user in trustInfo.truster_arr">
                            <a href="<{:U('FetcherInfo/index')}>/user_id/{{ user.truster_id }}">
                                <img ng-src="__UPLOAD__/{{ user.image_url }}" width="45px" height="45px">
                                <p class="text-name">
                                    {{ user.user_name }}
                                </p>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-10">
                    <p class="text-tips">
                        <!--信任圈子通常为真实生活中互相了解的朋友，相信他的工作能力，为他点赞！能够起到互相推广的效果。-->
                    </p>
                </div>
                <div class="col-xs-2 col-thin" ng-switch="hasTrusted">
                    <span ng-switch-when="1" class="icon-trust" ng-click="trust()">{{ getTrustNum() }}</span>
                    <span ng-switch-when="2"class="icon-trusted" ng-click="delTrust()">{{ getTrustNum() }}</span>
                </div>
            </div>
        </div>
    </div>

    <div role="tabpanel" class="col-normal">

        <div class="row">
            <div class="col-xs-12 col-panel-profile col-thin">
                <!-- Nav tabs -->
                <!--<h5>-->
                <ul class="nav nav-profile" role="tablist">
                    <li role="presentation" ng-click="isFirst = true">
                        <a href="#firstPart" aria-controls="firstPart" role="tab" data-toggle="tab" class="nav-profile fl-left" ng-class="{true: 'active'}[isFirst]">甲方信息</a>
                    </li>
                    <li role="presentation" ng-click="isFirst = false">
                        <a href="#secondPart" aria-controls="secondPart" role="tab" data-toggle="tab" class="nav-profile fl-right" ng-class="{false: 'active'}[isFirst]">乙方信息</a>
                    </li>
                </ul>
                <!--</h5>-->
            </div>
        </div>

        <div class="row">
            <div class="col-xs-12 wrap-col-cont">
                <!-- Tab panes -->
                <div class="tab-content">
                    <!-- First part info -->
                    <div role="tabpanel" class="tab-pane" ng-class="{true: 'active'}[isFirst]" id="firstPart">
                        <!--  Mission published by this user -->

                        <div class="row">
                            <div class="col-xs-12">
                                <h5>发布的活儿</h5>
                                <hr/>
                                <ul class="ul-normal ul-mission">
                                    <li class="li-arrow" ng-repeat="mission in firstInfo.mission">
                                        <a href="<{:U('Task/index')}>/mission/{{ mission.mission_id }}">
                                            <div class="row">
                                                <span class="mission-title">{{ mission.mission_name }}</span>
                                                <span ng-class="{true: 'tag-mission-done', false: 'tag-mission-undone'}[mission.status == 2]"></span>
                                            </div>

                                            <div class="row">
                                                <div class="col-xs-12">
                                                    <dl class="dl-horizontal dl-horizontal-single">
                                                        <dt>岗位需求</dt>
                                                        <dd>{{ mission.jobs }}&nbsp;</dd>
                                                        <dt>工作时限</dt>
                                                        <dd>{{ mission.durationMeaning }}&nbsp;</dd>
                                                    </dl>
                                                </div>
                                                <!--<div class="col-xs-6">-->
                                                    <!--<dl class="dl-horizontal dl-horizontal-multi">-->
                                                        <!--<dt>薪酬范围</dt>-->
                                                        <!--<dd>{{ mission.salary }}&nbsp;</dd>-->
                                                        <!--<dt>工作地点</dt>-->
                                                        <!--<dd>{{ mission.location }}&nbsp;</dd>-->
                                                    <!--</dl>-->
                                                <!--</div>-->
                                            </div>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div><!-- First part info END -->

                    <!-- Second part info -->
                    <div role="tabpanel" class="tab-pane" ng-class="{false: 'active'}[isFirst]" id="secondPart" ng-switch="isPublic">

                        <!-- Resume is not public -->
                        <div ng-switch-when="1">
                            <div ng-hide="userBase.is_self == 2">
                                <div class="row">
                                    <div class="col-xs-12 wrap-col-cont center">
                                        <button class="btn btn-main" ng-click="getPublicModal()" ng-disabled="secondInfo.status != 1">查看所有信息</button>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12">
                                        <p class="text-tips">
                                            乙方选择仅完全公开部分信息，您申请浏览乙方的所有信息后，我们将以短信形式最快通知到乙方，经乙方同意后，您将能够浏览其简历所有信息。
                                        </p>
                                    </div>
                                </div>
                                <hr/>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <dl class="dl-horizontal-single">
                                        <dt>建议薪酬</dt>
                                        <dd>{{ secondInfo.salary }}&nbsp;</dd>
                                        <dt>接活岗位</dt>
                                        <dd>{{ secondInfo.jobs }}&nbsp;</dd>
                                        <dt>学历信息</dt>
                                        <dd>{{ secondInfo.degreeMeaning }}&nbsp;&nbsp;</dd>
                                        <dt>代表经历</dt>
                                        <dd>
                                        <span>
                                            {{ secondInfo.experience.project_name }}&nbsp;{{ exp.role }}&nbsp;
                                        </span>
                                        </dd>
                                    </dl>
                                </div>
                            </div>
                        </div>
                        <!-- Resume is public -->
                        <div ng-switch-when="2" class="col-profile-nopublic">
                            <div ng-hide="userBase.is_self == 2" class="row">
                                <div class="col-xs-12 wrap-col-cont center">
                                    <button class="btn btn-main-short" ng-click="getProject()">就要Ta了</button>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12">
                                    <dl class="dl-horizontal-single">
                                        <dt>接活岗位</dt>
                                        <dd class="dd-jobs">{{ secondInfo.jobs }}&nbsp;</dd>
                                        <dt>自我介绍</dt>
                                        <dd class="dd-jobs">{{ secondInfo.introduction }}&nbsp;&nbsp;</dd>
                                    </dl>
                                </div>
                            </div>
                            <!--<div class="row">-->
                                <!--<div class="col-xs-12">-->
                                    <!--<dl class="dl-single">-->
                                        <!--<dt>简历加项</dt>-->
                                        <!--<dd>-->
                                            <!--<ul class="ul-float ul-attachment">-->
                                                <!--<li ng-repeat="image in images">-->
                                                    <!--<img ng-src="__UPLOAD__/{{ image.url }}" width="60px" height="60px"/>-->
                                                <!--</li>-->
                                                <!--<li ng-show="attach.video_url1">-->
                                                    <!--<video ng-src="__UPLOAD__/{{ attach.video_url }}" width="60px" height="60px"></video>-->
                                                <!--</li>-->
                                            <!--</ul>-->
                                        <!--</dd>-->
                                    <!--</dl>-->
                                <!--</div>-->
                            <!--</div>-->
                            <hr/>
                            <div class="row">
                                <div class="col-xs-12">
                                    <ul class="ul-normal ul-exp">
                                        <li ng-repeat="exp in secondInfo.experience">
                                            <dl class="dl-horizontal-single">
                                                <dt>项目名称/公司</dt>
                                                <dd>{{ exp.project_name }}&nbsp;</dd>
                                                <dt>工作职责</dt>
                                                <dd>{{ exp.role }}&nbsp;</dd>
                                                <dt>作品链接</dt>
                                                <dd><a ng-href="http://{{ exp.url }}">{{ exp.url }}&nbsp;</a></dd>
                                                <dt>附件</dt>
                                                <dd>
                                                    <ul class="ul-float ul-profile">
                                                        <li ng-repeat="attach in exp.attachment | limitTo:3">
                                                            <img ng-src="__UPLOAD__/{{ attach.image_url }}" onclick="scaleAttach(this)" width="50px" height="50px">
                                                        </li>
                                                    </ul>
                                                </dd>
                                            </dl>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>

                    </div><!-- Second part info END -->
                </div>
            </div>
        </div>
    </div>

     <!-- Modal Select Second Part -->
     <div class="modal fade" id="selectModal" tabindex="-1" role="dialog" aria-labelledby="selectModalLabel" aria-hidden="true">
         <div class="modal-dialog">
             <div class="modal-content">
                 <div class="modal-header">
                     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                     <div class="row modal-title" id="selectModalLabel">
                         <div class="col-xs-2 col-thin">
                             <img ng-src="__UPLOAD__/{{ userBase.image_url }}" width="50px" height="50px">
                         </div>
                         <div class="col-xs-7 col-profile-head">
                             <h4>{{ userBase.user_name }}</h4>
                             <div class="tag-group">
                                 <span class="tag-level-first">甲.V{{ userBase.level_j }}</span>
                                 <span class="tag-level-second">乙.V{{ userBase.level_y }}</span>
                             </div>
                         </div>
                         <div class="col-xs-2 col-thin center" ng-switch="hasFavored">
                             <span class="icon-fav" ng-switch-when="1" ng-click="favUser()">收藏</span>
                             <span class="icon-fav-del" ng-switch-when="2" ng-click="delFavUser()">取消收藏</span>
                         </div>
                     </div>
                 </div>
                 <div class="modal-body">
                     <h6 class="text-tips">哪个活儿要Ta？</h6>
                     <h6 ng-hide="missions" class="text-tips center">亲，您还没有发活儿哦~</h6>
                     <div class="radio" ng-repeat="mission in missions">
                         <label>
                             <input type="radio" name="optionsRadios" ng-model="$parent.missionId" ng-value="mission.mission_id">
                             {{ mission.mission_name }}
                         </label>
                     </div>
                 </div>
                 <div class="modal-footer center">
                     <button type="button" id="modalSubmit" class="btn btn-main" ng-click="select()">发送</button>
                 </div>
             </div>
         </div>
     </div>

     <!-- Modal Public -->
     <div class="modal fade" id="publicModal" tabindex="-1" role="dialog" aria-labelledby="publicModalLabel" aria-hidden="true">
         <div class="modal-dialog">
             <div class="modal-content">
                 <div class="modal-header">
                     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                     <div class="row modal-title" id="publicModalLabel">
                         <div class="col-xs-2 col-thin">
                             <img ng-src="__UPLOAD__/{{ userBase.image_url }}" width="50px" height="50px">
                         </div>
                         <div class="col-xs-7 col-profile-head">
                             <h4>{{ userBase.user_name }}</h4>
                             <div class="tag-group">
                                 <span class="tag-level-first">甲.V{{ userBase.level_j }}</span>
                                 <span class="tag-level-second">乙.V{{ userBase.level_y }}</span>
                             </div>
                         </div>
                         <div class="col-xs-2 col-thin center" ng-switch="hasFavored">
                             <span class="icon-fav" ng-switch-when="1" ng-click="favUser()">收藏</span>
                             <span class="icon-fav-del" ng-switch-when="2" ng-click="delFavUser()">取消收藏</span>
                         </div>
                     </div>
                 </div>
                 <div class="modal-body">
                     <h6 class="text-tips">留言</h6>
                     <textarea rows="4" class="form-control" ng-model="publicCont"></textarea>
                 </div>
                 <div class="modal-footer center">
                     <button type="button" class="btn btn-main" ng-click="public()">发送</button>
                 </div>
             </div>
         </div>
     </div>

     <!-- Modal Phone Number -->
     <div class="modal fade" id="contactModal" tabindex="-1" role="dialog" aria-labelledby="contactModalLabel" aria-hidden="true">
         <div class="modal-dialog">
             <div class="modal-content">
                 <div class="modal-header">
                     <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
                     <!--<h4 class="modal-title" id="contactModalLabel"></h4>-->
                 </div>
                 <div class="modal-body center">
                     <a id="phone" ng-href="tel:{{ phone }}" class="text-name">{{ phone }}</a>
                 </div>
             </div>
         </div>
     </div>

     <!-- Modal Report -->
     <div class="modal fade" id="reportModal" tabindex="-1" role="dialog" aria-labelledby="reportModalLabel" aria-hidden="true">
         <div class="modal-dialog">
             <div class="modal-content">
                 <div class="modal-header">
                     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                     <h4 class="modal-title" id="reportModalLabel"></h4>
                 </div>
                 <div class="modal-body">
                     <h6 class="text-tips">举报内容</h6>
                     <textarea rows="4" class="form-control" ng-model="reportCont"></textarea>
                 </div>
                 <div class="modal-footer center">
                     <button type="button" class="btn btn-main" ng-click="report()">发送</button>
                 </div>
             </div>
         </div>
     </div>

     <!-- Modal Image Scaler -->
     <div class="modal fade" id="scaleModal" tabindex="-1" role="dialog" aria-labelledby="scaleModalLabel" aria-hidden="true">
         <div class="modal-dialog">
             <div class="modal-content">
                 <div class="modal-header">
                     <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
                     <!--<h4 class="modal-title" id="contactModalLabel"></h4>-->
                 </div>
                 <div class="modal-body center">
                     <a href="javascript:;" data-dismiss="modal">
                        <img src="" width="100%">
                     </a>
                     <!--<a id="phone" ng-href="tel:{{ phone }}" class="text-name">{{ phone }}</a>-->
                 </div>
             </div>
         </div>
     </div>

     <script>
         function scaleAttach(img) {
             var appElement = document.querySelector('[ng-controller=extEditController]');
             $('#scaleModal').modal('show');
             $('#scaleModal img').attr('src', img.src);
//             angular.element(appElement).scope().
//                     scaleAttach(imageIndex);
         }
     </script>
</div>